﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Modify.aspx.cs" Inherits="Modify" Title="Modify Issue" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    </style>
    <style type="text/css">
        .style44
        {
            width: 131px;
            background-color: #FFFFFF;
        }
        .style45
        {
            width: 131px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <p></p><asp:Label ID="Label1" runat="server" Text="Modify The Selected Issue" 
        
    style="font-family: Georgia; font-size: large; font-weight: 700; color: #3399FF"></asp:Label></p>
    <asp:ValidationSummary ID="ValidationSummary1" runat="server" 
        EnableViewState="False" HeaderText="Please resolve theses validation errors" 
        ValidationGroup="validate" />
    <table style="width: 731px" border="1 px" cellpadding="8" cellspacing="0">
        <tr>
            <td bgcolor="#CCFFFF" class="style45" style="text-align: center" >
                <asp:Label ID="lblId" runat="server" Text="Issue Id" style="font-family: Georgia; color: #660066"></asp:Label>
            </td>
            <td>
                <asp:Label ID="lblDisplayId" runat="server" Text="" style="font-family: Georgia; color: #660066"></asp:Label>
            </td>
        </tr>
        <tr>
            <td bgcolor="#CCFF66" class="style45" style="text-align: center" >
                <asp:Label ID="lblCreator" runat="server" style="font-family: Georgia; color: #660066" Text="Creator's Name"></asp:Label>
            </td>
            <td>
                <asp:Label ID="lblDisplayCreator" style="font-family: Georgia; color: #660066" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td bgcolor="#CC99FF" class="style45" style="text-align: center" >
                <asp:Label ID="lblLabel" runat="server" Text="Label" style="font-family: Georgia; color: #660066"></asp:Label>
            </td>
            <td>
                <asp:Label ID="lblDisplayLabel" style="font-family: Georgia; color: #660066" runat="server"></asp:Label>
            </td>
        </tr>
        <tr>
            <td bgcolor="#FFCCFF" class="style45" style="text-align: center" >
                <asp:Label ID="lblCategory" runat="server" Text="Category" 
                    style="font-family: Georgia; color: #660066" AssociatedControlID="ddlCategory"></asp:Label>
            </td>
            <td >
                <asp:DropDownList ID="ddlCategory" runat="server"  Width="152px" 
                    DataSourceID="sdsCategory" DataTextField="cat_name" 
                    DataValueField="cat_id" style="background-color: #FFFFCC">
                </asp:DropDownList>
                <asp:SqlDataSource ID="sdsCategory" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                    SelectCommand="SELECT [cat_id], [cat_name] FROM [category] ORDER BY [cat_id]">
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td bgcolor="#FF9966" class="style45" style="text-align: center" >
                <asp:Label ID="lblPriority" runat="server" Text="Priority" 
                    style="font-family: Georgia; color: #660066" AssociatedControlID="ddlPriority"></asp:Label>
            </td>
            <td >
                <asp:DropDownList ID="ddlPriority" runat="server" Width="152px" 
                    DataSourceID="sdsPriority" DataTextField="priority_code" 
                    DataValueField="priority_code" style="background-color: #FFFFCC">
                </asp:DropDownList>
                <asp:SqlDataSource ID="sdsPriority" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                    SelectCommand="SELECT [priority_code], [priority_rank] FROM [priority] ORDER BY [priority_rank] DESC">
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td bgcolor="#CCFFFF" class="style45" style="text-align: center" >
                <asp:Label ID="lblAssign" runat="server" Text="Assigned To" 
                    style="font-family: Georgia; color: #660066" AssociatedControlID="ddlAssigned"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="ddlAssigned" runat="server" Width="152px" 
                    DataSourceID="sdsAssigned" DataTextField="user_uname" 
                    DataValueField="user_uname" style="background-color: #FFFFCC">
                </asp:DropDownList>
                <asp:SqlDataSource ID="sdsAssigned" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                    SelectCommand="SELECT [user_uname] FROM [user] ORDER BY [user_uname]">
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td bgcolor="#CCFF66" class="style45" style="text-align: center" >
                <asp:Label ID="lblDescription" runat="server" Text="Description" 
                    style="font-family: Georgia; color: #660066" 
                    AssociatedControlID="txtDescription"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtDescription" runat="server" Height="137px" 
                    TextMode="MultiLine" Width="300px" MaxLength="1000" 
                    style="background-color: #FFFFCC"></asp:TextBox>
                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                    ControlToValidate="txtDescription" Display="Dynamic" 
                    ErrorMessage="Description is required." ValidationGroup="validation" 
                    EnableViewState="False">*</asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td bgcolor="#99FFCC" class="style45" style="text-align: center" >
                <asp:Label ID="lblStatus" runat="server" Text="Status" 
                    style="font-family: Georgia; color: #660066" AssociatedControlID="ddlStatus"></asp:Label>
            </td>
            <td>
                <asp:DropDownList ID="ddlStatus" runat="server" DataSourceID="sdsStatus" 
                    DataTextField="status_name" DataValueField="status_code" Width="152px" 
                    style="background-color: #FFFFCC">
                </asp:DropDownList>
                <asp:SqlDataSource ID="sdsStatus" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                    SelectCommand="SELECT [status_code], [status_name] FROM [status] ORDER BY [status_code]">
                </asp:SqlDataSource>
            </td>
        </tr>
        <tr>
            <td bgcolor="#FFCC66" class="style45" style="text-align: center" >
                <asp:Label ID="lblResolve" runat="server" Text="Date Resolved" 
                    style="font-family: Georgia; color: #660066" 
                    AssociatedControlID="txtDateResolved"></asp:Label>
            </td>
            <td>
                <asp:TextBox ID="txtDateResolved" runat="server" 
                    style="background-color: #FFFFCC"></asp:TextBox>
&nbsp;(MM/DD/YYYY)<asp:RegularExpressionValidator ID="RegularExpressionValidator1" 
                    runat="server" ControlToValidate="txtDateResolved" 
                    ErrorMessage="Date Resolved is not valid." 
                    ValidationExpression="((^(10|12|0?[13578])([/])(3[01]|[12][0-9]|0?[1-9])([/])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(11|0?[469])([/])(30|[12][0-9]|0?[1-9])([/])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(0?2)([/])(2[0-8]|1[0-9]|0?[1-9])([/])((1[8-9]\d{2})|([2-9]\d{3}))$)|(^(0?2)([/])(29)([/])([2468][048]00)$)|(^(0?2)([/])(29)([/])([3579][26]00)$)|(^(0?2)([/])(29)([/])([1][89][0][48])$)|(^(0?2)([/])(29)([/])([2-9][0-9][0][48])$)|(^(0?2)([/])(29)([/])([1][89][2468][048])$)|(^(0?2)([/])(29)([/])([2-9][0-9][2468][048])$)|(^(0?2)([/])(29)([/])([1][89][13579][26])$)|(^(0?2)([/])(29)([/])([2-9][0-9][13579][26])$))" 
                    ValidationGroup="validate" Display="Dynamic" EnableViewState="False">*</asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td class="style44" >
                &nbsp;</td>
            <td>
                <asp:Button ID="btnSave" runat="server" Text="Save Changes" onclick="btnSave_Click" 
                    
                    onclientclick="return confirm(&quot;Are you sure you want to save changes to this issue?&quot;);" />
                <asp:Button ID="btnDiscard" runat="server" Text="Discard Changes" 
                    onclick="btnDiscard_Click" Width="120px" CausesValidation="False" />
                <asp:Button ID="btnDelete" runat="server" Text="Delete Issue" 
                    onclick="btnDelete_Click" 
                    
                    onclientclick="return confirm(&quot;Are you sure you want to delete this issue?&quot;);" 
                    CausesValidation="False" />
            </td>
        </tr>
        </table>
    <asp:Label ID="lblErrorStatus" runat="server" Text=""></asp:Label>
</asp:Content>

